package com.start.cms.service.Impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.start.cms.entity.StartCmsArticleEntity;
import com.start.cms.entity.VStartCmsArticleDetailEntity;
import com.start.cms.mappers.StartCmsArticleMapper;
import com.start.cms.service.StartCmsArticleService;
import org.springframework.stereotype.Service;

@Service
public class StartCmsArticleServiceImpl extends ServiceImpl<StartCmsArticleMapper, StartCmsArticleEntity> implements StartCmsArticleService {

    @Override
    public Page<VStartCmsArticleDetailEntity> pageArticleDetail(Page<VStartCmsArticleDetailEntity> page, Wrapper<VStartCmsArticleDetailEntity> wrapper) {
        return getBaseMapper().pageArticleDetail(page, wrapper);
    }

    @Override
    public VStartCmsArticleDetailEntity articleDetailById(String articleId) {

        return getBaseMapper().articleDetailById(articleId);
    }

    @Override
    public Integer updateArticlePvUv(String articleId, Integer articlePv, Integer articleUv) {
        return getBaseMapper().updateArticlePvUv(articleId,articlePv,articleUv);
    }
}
